package com.hemi.rhet;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public class SelfAdapter extends BaseAdapter {


	private List<View> data= null;
	public SelfAdapter(Context context,List<View> data) {
		if(data==null)
		{
			this.data = new ArrayList<View>();;
		}else{
			this.data = data;
		}
	}

	public int getCount() {
		return data.size();
	}

	public Object getItem(int position) {
		return data.get(position);
	}
	public long getItemId(int position) {
		return position;
	}

	/**
	 * 生成ListView的Item布局。
	 */
	public View getView(int position, View convertView, ViewGroup parent) {
		return data.get(position);
	}

	public void addView(View view){
		data.add(view);
		
	}
}